package com.itany.corejava.day07;

public class Person {
    protected String name;

    public Person(String name) {
        this.name = name;
    }

    public void move(){
        System.out.println(name+"走");
    }

    public void move(Transport transport){
        System.out.print(name+"乘坐");
        transport.move();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
